package org.xb.dbc;
import java.sql.*;

import org.xb.vo.Myuser;
public class DatebaseConnection {
	public static final String DBDRIVER = "org.gjt.mm.mysql.Driver" ;
	public static final String DBURL = "jdbc:mysql://localhost:3306/tx" ;
	public static final String DBUSER = "root" ;
	public static final String DBPASS = "dmtds" ;
private Connection conn;
public DatebaseConnection(){
	try{
		Class.forName(DBDRIVER);
		this.conn = DriverManager.getConnection(DBURL, DBUSER, DBPASS);
	}catch(Exception e){
		e.printStackTrace();
	}
}
public Connection getConnection(){
	return this.conn;
}
public void close(){
	if(this.conn!=null){
		try{
			this.conn.close();
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}

}
